Repository navigation
Design audit + landing page tightening: accessibility, mobile, performance, typography, conversion - #43
Merged
Conversation
- Load real 700 weights for Hanuman, Atkinson Hyperlegible and Cascadia Mono (headings were faux-bolded), with metric-matched fallbacks - Preload only body 400 and heading 700 - Use Cascadia Mono in Expressive Code blocks - Article prose: Hanuman headings with clearer scale, tighter leading, balanced/pretty wrapping, themed selection, underline offsets - Admonitions: hairline border instead of thick left stripe - Add PRODUCT.md with confirmed product context
- Light theme primary deepened to oklch(50% 0.16 149): ~5:1 as text on light surfaces and behind white button labels (was 2.5-3.1:1) - New caution/danger ink tokens for callout titles (were 1.55-2.4:1) - Footer credits and GitHub link raised above 4.5:1 - Callout titles keep authored casing (.env was rendered as .Env)
- Wrap markdown tables in a focusable, labelled horizontal scroll region - Long inline code, link text and callout titles wrap instead of overflowing - Single-column grids use minmax(0,1fr) so images cannot widen them (320px) - Sidebar promo card is one large link instead of card + 20px inner link - Mobile menu links are 44px tall
- Homepage rendered <Navigation /> twice (duplicate ids); render it once - Hidden top bar reveals itself while focus is inside it; collapsed mobile menu is inert; toggle exposes aria-expanded/aria-controls and a label - Skip-to-content link and a <main id=main-content> on every page - Blog cards: drop positive tabindex and role=link; one stretched title link per card instead of three - FAQ accordion: heading > button pattern with aria-expanded (was h5 inside button) - Footer column titles h3 -> h2; article share block is a <footer>; labelled breadcrumb, related-articles nav and numbered table regions
- Hero particles: CSS-only backdrop (build-time positions, transform-only drift) instead of framer-motion re-rendering 25 nodes on every scroll - Counters: final values rendered in HTML (was 0 for crawlers/no-JS), count-up via a ~1KB IntersectionObserver script, tabular figures, semantic <dl>, '30k' instead of '30.0k' - Star ratings: one masked element with an accessible label instead of five SVGs each (184 inline SVGs, ~118KB of HTML); hero shows 4.6 stars - Remove framer-motion and the unused components/hooks Homepage JS 947KB -> 571KB (479KB is gtag); HTML 441KB -> 322KB
- Hover lift/scale effects use motion-safe: (color/shadow feedback stays) - Smooth scrolling only without a reduced-motion preference - Testimonial carousel: no autoplay with reduced motion; otherwise a visible pause/play button (WCAG 2.2.2), pause on hover and on keyboard focus, Swiper A11y module for slide labels
Text blocks in .prose max out at 39rem (measured median 71 / max 75 chars, was 86 / 92). Code blocks and tables keep the full column width.
- Remove the shimmering 'The #1 Node.js Book' pill above the hero h1 - 'hard' in the problem statement: solid text with a secondary underline instead of gradient-clipped text - Remove the hairline grid overlay behind the Opinions section
Also add rel=noopener to external review links.
- dark: variant follows the theme toggle (data-theme) instead of only the OS preference; hero no longer goes dark when light is chosen - Apply the saved theme in an inline head script (no wrong-theme flash) - Primary button text uses primary-content: white-on-green failed AA in dark mode (~2.7:1) - Replace nonexistent classes (primary-focus, primary-foreground, -sm:left-6 quote mark offsets) - Trim legacy .content CSS to what the FAQ answers use (renamed .faq-answer); drop hard-coded #eee/#ccc/#fa6432 rules
- Chapter list: a real <button aria-expanded> in each title (stretched over the header) instead of a clickable <div>; chapters were mouse-only - Chapter titles are h3 with snug leading (was leading-none when wrapping) - Carousel dots: 24px hit area around the 8px dot (WCAG 2.5.8) - Email placeholder and nav links raised above 4.5:1
- WhyChoose said 660 pages, SITE_DESCRIPTION said 660+/150+ (canonical: 732/170) - 'Join thousands' -> READERS count; drop '+'/'more than' on exact counts - Sidebar promo copy: drop 'become a PRO'
- Hero on phones: headline + buy buttons first, smaller cover after (Buy print at y=381 on 390x844, was 870). Desktop unchanged - Mobile header shows 'Get the book' next to the menu toggle; drop the now-duplicate CTA inside the menu; short 'Node.js DP' brand under 380px
'Fourth Edition, October 2025 · Print and Kindle on Amazon · also from Packt' (edition, date and links from const.ts). BuyButtons gains an align prop for centered placements.
- Buy button pairs 5 -> 3 (hero, after the action plan, after reviews); drop the ProblemStatement and Quotes CTA bands - Book numbers live in the counters; WhatsInside/ActionPlan/WhyChoose keep their own angle instead of restating 13/170/54/732 - Quote wall skips the three people already in the opening carousel - Reviews: first 12 shown, 'Show all 52 reviews' reveals the rest in place (all reviews visible without JS; focus moves to the first new review) Page height: desktop ~19.9k -> 17.1k px, mobile ~38.3k -> 29.4k px
- Chapters, Quotes, Reviews and WhyChoose section titles use the same Hanuman 4xl/5xl heading as every other section (were sans or 4xl/semi) - Chapter rows: one chevron that flips when expanded instead of a '›' that suggested navigation
- WhyChoose code card: smaller code size so the visible lines fit - GitHub Discussions screenshot: cropped edge fades into its own background instead of cutting titles mid-word - Breadcrumb crumbs wrap as whole units; aria-current on the last one - Dark mode: secondary 'Buy e-book' uses neutral so it no longer outweighs the primary green button - 404: decorative ASCII layer is aria-hidden
- Header 'Get the book' (desktop + mobile) uses the primary green like every other buy button (was orange secondary) - Free chapter form submits to Kit in place (Kit allows CORS, answers JSON) and shows 'Check your inbox' with the address; Kit errors show inline; network failure falls back to the native new-tab submit; works unchanged without JS
Spacer | dots | toggle grid so the dots sit on the page centre whether or not the pause button is shown; dots and icon share a vertical centre.
Landing - Hanuman 700 for every heading-like role: section h2 (line-height 1.1), card titles (WhyChoose now h3 like ActionPlan/WhatsInside), chapter and FAQ accordion titles, counters (was Cascadia Mono as decoration) - ProblemStatement statement one step below the hero h1; its card is a ~42rem reading column (paragraphs ran ~128 chars/line) - One lede style for section subtitles (1.375rem, /75, max 40rem) - Pull quote leading-snug; no faux italic on Hanuman quote marks; attributions in sans - Small buttons use the 14px label size (nav CTA was 12px) Articles - Lede distinct from body (1.375rem) and aligned to the 39rem text column - 17px body on phones; 15px code on desktop (was 14px next to 20px body) - Lighter inline-code chip; no chip inside headings; callout body 0.9em System - Only 400/700 are loaded: font-medium/semibold/extrabold classes and prose strong/a weights now say what actually renders - Preload the Hanuman variable font (the 700-only filter stopped matching) - Compact nav (brand, Get the book, menu with theme toggle) up to lg; full link bar from 1024px (it collided at 768px); phones previously had no theme toggle at all
Landing - Two-step section rhythm: funnel stages py-16/lg:py-24, tight joins py-10/lg:py-12 for counters + trust quote, WhatsInside -> Chapters and Quotes -> Reviews (one proof zone). Removes mt-16 + sm:py-32 stacking that left 192-320px voids - Every section uses the max-w-7xl frame and px-4/sm:px-6/lg:px-8 gutter: left-aligned content starts on one edge (was 104/112/168) - FAQ: questions take the wider column; the photo stays in view (sticky) - Bigger hit areas: review source links, Packt link, footer links, article share icons Blog - Sidebar from lg instead of md: at 768px articles get 720px (was 432) and cards 344px (was 212) - Below lg the book promo sits inline (after the article; after the first row of cards on the index) instead of the bottom of the page. BookPromo supports multiple copies with cta_position sidebar/inline - Article meta grouped under the author; ToC matches the text measure; tablet text measure ~72 chars at 17px
A paragraph holding only an image (or a linked image) uses the full article column (48rem desktop, 720px at 768) instead of the 39rem text measure. Small images keep their natural size.
…ss burst - The free chapter section becomes the page's one dark band (ink in both themes), with the book cover's flowing line ribbon redrawn as build-time SVG behind the form and the Chapter 6 photo. A few lines carry 'chunks' streaming along them (Chapter 6 is Coding with Streams); the flow runs only while on screen and never with reduced motion - Solid card instead of translucent blur; FREE in the cover amber - On a successful signup: the stream flushes brighter, a one-shot canvas burst of stream chunks pops from the button (self-removing, no dependency), and the confirmation rises in with a self-drawing mail icon and a chapter6.pipe(yourInbox) wink. Reduced motion: no burst or flow, the confirmation just fades in
The chapter photo duplicated the card heading and hid most of the cover ribbon. Drop it and center the form card (max-w-2xl) in the band: the ribbon runs behind it, visible on both sides on wide screens and flowing out beneath it on phones. The image asset stays in the repo, unused.
Each blog post now gets its own 1200x630 Open Graph image, built at /og/<slug>.png with Satori and sharp, instead of the site-wide book photo. The card shows the title, description and byline next to the book cover, so links read as the article (even as a small LinkedIn thumbnail). The layout also takes an ogImageAlt prop so share images get a matching description instead of always saying "book cover".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes everything from a design/technical audit of the landing page, blog index and articles (accessibility, mobile, motion, performance, typography), plus a
PRODUCT.mdwith product context.Theme tokens (light only; dark unchanged):
Typography: real 700 weights for Hanuman / Atkinson / Cascadia (headings were faux-bold), Cascadia in code blocks, Hanuman article headings, text capped at ~70 chars/line.
Landing page tightening (from two design critiques)
index.astro <Hero> # mobile: headline + buy buttons before the cover (Buy print y=870 -> 381 @390x844) <BuyButtons> + "Fourth Edition, October 2025 · Print and Kindle on Amazon · also from Packt" <ProblemStatement> - CTA band + buy buttons <WhatsInside> / <ActionPlan> / <WhyChoose> - 13 / 170 / 54 / 732 restated # numbers live in <Counters> only <Quotes> - 3 quotes already in the carousel, CTA band + buy buttons <Reviews> - 52 reviews at once + first 12 + "Show all 52 reviews" (all visible without JS) <FreeChapter form> - target="_blank" to Kit, no confirmation + fetch to Kit (CORS ok) -> "Check your inbox" in place; errors inline; native fallback Navigation - orange "Get the book" (desktop only) + green "Get the book" on desktop and mobile headersrc/lib/const.ts(was 660 vs 732 pages, "thousands" vs 30k+, SEO description 660+/150+).aria-hiddenpolish.Evidence
Measured against
pnpm build && pnpm previewwith Playwright + axe-core 4.10 (WCAG 2.0–2.2 A/AA + best-practice) and the Impeccable detector.23b1699)pnpm lint,pnpm typecheck,pnpm format:checkpass.Merge Danger
Door: two-way
Static site, no data or URL changes; revert restores the previous build.
Blast Radius: sitewide-visual
rm -rf node_modules/.astrolocally if tables don't show the scroll wrapper (CI builds clean).🤖 Generated with Claude Code